package com.yshy.moviechoseseatingouterapi.controller;
import com.yshy.moviechoseseatingouterapi.service.OrdersService;
import com.yshy.moviechoseseatingcommon.entity.bo.orders.NoticeBo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.security.NoSuchAlgorithmException;

/**
 * @author :
 * @desc :
 * @create: 下午1:43
 **/
@RestController
@RequestMapping("/orders")
public class OrdersController {
   @Autowired
   OrdersService ordersService;

    /**
     * 订单事件通知
     * @param bo
     * @return
     */
    @PostMapping("notice")
    public String notice(@RequestBody @Valid NoticeBo bo) throws NoSuchAlgorithmException, InterruptedException {
        return ordersService.notice(bo);
    }

}
